<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
<div id="app">
    <p></p>
    <h3 @click="aaa">标签值获取</h3>
    <h3 @click="bbb">点击</h3>
    <a href="https://xdclass.net" @click="bbb">跳转</a>
    <div @click="bbb">
        <a href="https://xdclass.net" @click.prevent.stop="bbb">小滴课堂</a>
    </div>
    <div @click.once="bbb">一次事件</div>

    <div>键盘事件 <input type="text" @keyup.enter="change" /></div>
</div>
<script>
    Vue.config.productionTip = false;
    new Vue({
        el: '#app',
        data: {
            name: '小滴课堂',
        },
        methods: {
            aaa(){
              alert(event.target.innerText);
            },
            bbb() {
                alert(111);
            },
            change() {
                console.log(222);
            },
        },
    });
</script>
</body>
</html>
